﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:Classes="clr-namespace:LASDesktop.Classes" mc:Ignorable="d" 
        x:Class="LASDesktop.ModuloInventario.Inventario"
        Title="Inventario" Height="700" Width="1047" Background="#FFBCBCBC" WindowStartupLocation="CenterScreen" Foreground="#FFBCBCBC" Closing="CloseParent">
    <Window.Resources>
        <Style TargetType="{x:Type Button}">
			<Setter Property="SnapsToDevicePixels" Value="true"/>
			<Setter Property="OverridesDefaultStyle" Value="true"/>
			<Setter Property="MinHeight" Value="23"/>
			<Setter Property="MinWidth" Value="75"/>
			<Setter Property="Template">
			  <Setter.Value>
			    <ControlTemplate TargetType="{x:Type Button}">
			      <Border 
			        x:Name="Border"  
			        CornerRadius="2" 
			        BorderThickness="1"
			        Background="#FF0384C5"
			        BorderBrush="#FF0384C5">
			        <ContentPresenter 
			          Margin="2"
			          HorizontalAlignment="Center"
			          VerticalAlignment="Center"
			          RecognizesAccessKey="True"/>
			      </Border>
			      <ControlTemplate.Triggers>
			        <Trigger Property="IsKeyboardFocused" Value="true">
			          <Setter TargetName="Border" Property="BorderBrush" Value="#FF0384C5" />
			        </Trigger>
			        <Trigger Property="IsDefaulted" Value="true">
			          <Setter TargetName="Border" Property="BorderBrush" Value="#FF0384C5" />
			        </Trigger>
			        <Trigger Property="IsMouseOver" Value="true">
			          <Setter TargetName="Border" Property="Background" Value="#FF0384C5" />
			        </Trigger>
			        <Trigger Property="IsPressed" Value="true">
			          <Setter TargetName="Border" Property="Background" Value="#FF0384C5" />
			          <Setter TargetName="Border" Property="BorderBrush" Value="#FF0384C5" />
			        </Trigger>
			        <Trigger Property="IsEnabled" Value="false">
			          <Setter TargetName="Border" Property="Background" Value="#FF0384C5" />
			          <Setter TargetName="Border" Property="BorderBrush" Value="#FF0384C5" />
			          <Setter Property="Foreground" Value="#888888"/>
			        </Trigger>
			      </ControlTemplate.Triggers>
			    </ControlTemplate>
			  </Setter.Value>
			</Setter>
			</Style>
		<Style TargetType="{x:Type TabItem}">
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="{x:Type TabItem}">
    				<Grid>
    					<Border x:Name="Border">
    						<ContentPresenter x:Name="ContentSite" VerticalAlignment="Center" HorizontalAlignment="Center"  ContentSource="Header" Margin="12,2,12,2"/>
    					</Border>
    				</Grid>
    				<ControlTemplate.Triggers>
    					<Trigger Property="IsSelected" Value="True">
    						<Setter TargetName="Border" Property="Background" Value="#a7a5a5" />
    						<Setter TargetName="Border" Property="BorderBrush" Value="#a7a5a5" />
							
    					</Trigger>
    					<Trigger Property="IsSelected" Value="False">
    						<Setter TargetName="Border" Property="Background" Value="#FF515454" />
    						<Setter TargetName="Border" Property="BorderBrush" Value="#FF515454" />
    					</Trigger>
    					<Trigger Property="IsSelected" Value="False">
    						<Setter Property="Foreground" Value="White"/>
    					</Trigger>
    				</ControlTemplate.Triggers>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>

    <Classes:ImageConverter x:Key="converter"/>

    </Window.Resources>
	
	<Grid>
        <Rectangle Height="100" HorizontalAlignment="Left"  x:Name="rectangle1"  VerticalAlignment="Top" Width="1031" Fill="#FF515454" Stroke="#FF515454" SnapsToDevicePixels="False" Margin="0,-1,0,0" />
        <Image Height="100" HorizontalAlignment="Left" Margin="0,-2,0,0" x:Name="image1" Stretch="Uniform" VerticalAlignment="Top" Width="250" Source="..\Graphics\Banner.png"/>
        <Label Content="Inventario" Height="43" HorizontalAlignment="Left" Margin="41,107.5,0,0" x:Name="label1" VerticalAlignment="Top" FontFamily="../Fonts/GeosansLight.ttf#GeosansLight" Width="261" FontSize="30" Foreground="#FF0384C5" />
        <TabControl Name="TabCtrlPrincipal" Margin="41,154.5,41,25" Background="#FFA7A5A5" BorderBrush="{x:Null}">
        	<TabItem Name="TabDeMaestro" Header="Maestro de Artículos" FontSize="18.667" FontFamily="/LASDesktop;component/Fonts/#GeosansLight"  d:LayoutOverrides="HorizontalAlignment">
        		<Grid>
                    <DataGrid Name="MaestroArticulosGrid"  AutoGenerateColumns="False" Height="336" HorizontalAlignment="Left" Margin="26,26,0,0" VerticalAlignment="Top" Width="891" FontFamily="Calibri" FontSize="15" BorderBrush="{x:Null}" Background="#FFDEDEDE" HorizontalGridLinesBrush="#FFBCBCBC" VerticalGridLinesBrush="#FFBCBCBC" RowBackground="#FFDEDEDE" CanUserAddRows="False">
                   
                        <DataGrid.Columns>
                            <DataGridTemplateColumn Width="120" Header="Imagen">
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <Grid Width="100" Height="100">
                                            <Border Width="85" Height="85" BorderThickness="4" BorderBrush="#FF515454">
                                                <Image Width="75" Height="75" Source="{Binding Path=Fotos, Converter={StaticResource converter}}" />
                                            </Border>
                                        </Grid>
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>

                            <DataGridTemplateColumn Width="170" Header="Código" IsReadOnly="True">
                                    <DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <Grid Width="155">
                                                <TextBlock Text="{Binding CodigoUnico}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
                                            </Grid>
                                        </DataTemplate>
                                    </DataGridTemplateColumn.CellTemplate>
                                </DataGridTemplateColumn>

                            <DataGridTemplateColumn Width="300" Header="Descipción" IsReadOnly="True">
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <Grid Width="280" Height="120" >
                                            <TextBlock Text="{Binding Descripcion}" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" ></TextBlock>
                                        </Grid>
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>

                            <DataGridTemplateColumn Width="120" Header="Medida" IsReadOnly="True">
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <Grid Width="100" Height="50" >
                                            <TextBlock Text="{Binding Medida.Nombre}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
                                        </Grid>
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>

                           
                            <DataGridTemplateColumn Width="150" IsReadOnly="True">
                                <DataGridTemplateColumn.CellTemplate>
                                    <DataTemplate>
                                        <Grid Width="125" Height="100">
                                            
                                            <Button Content="Ver detalles" FontFamily="/LASDesktop;component/Fonts/#GeosansLight" FontSize="21.333" Foreground="White" Height="34" x:Name="SubmitButton_Copy" VerticalAlignment="Center" HorizontalAlignment="Left" Width="125" Clip="M0.5,15.5 C0.5,7.2157288 7.2157288,0.5 15.5,0.5 L109.5,0.5 C117.78427,0.5 124.5,7.2157288 124.5,15.5 L124.5,18.5 C124.5,26.784271 117.78427,33.5 109.5,33.5 L15.5,33.5 C7.2157288,33.5 0.5,26.784271 0.5,18.5 z" Click="ViewDetailsButtonClick" Cursor="Hand" />
                                        </Grid>
                                    </DataTemplate>
                                </DataGridTemplateColumn.CellTemplate>
                            </DataGridTemplateColumn>

                        </DataGrid.Columns>
                    </DataGrid>
                    <Button Background="#FF0384C5" BorderBrush="{x:Null}" Clip="M5.5,27.5 C5.5,16.454305 14.454305,7.5 25.5,7.5 L200,7.5 C211.04569,7.5 220,16.454305 220,27.5 L220,30.72 C220,41.765695 211.04569,50.72 200,50.72 L25.5,50.72 C14.454305,50.72 5.5,41.765695 5.5,30.72 z" Content="Agregar Nuevo Artículo" FontFamily="/LASDesktop;component/Fonts/#GeosansLight" FontSize="21.333" Foreground="White" Height="57.22" HorizontalAlignment="Right" Margin="0,379.14,22,0" Name="SubmitButton" VerticalAlignment="Top" Width="226.5" Click="SubmitButtonClick" Cursor="Hand" />
                </Grid>
                
            </TabItem>
            <TabItem Name="TabDeBodegas" Header="Bodegas" FontSize="18.667" FontFamily="/LASDesktop;component/Fonts/#GeosansLight"  d:LayoutOverrides="HorizontalAlignment">
        		<Grid>
        			<DataGrid x:Name="BodegasGrid"  AutoGenerateColumns="False" Height="276.5" HorizontalAlignment="Left" Margin="27,89,0,0" VerticalAlignment="Top" Width="886" FontFamily="Calibri" FontSize="15" BorderBrush="{x:Null}" Background="#FFDEDEDE" HorizontalGridLinesBrush="#FFBCBCBC" VerticalGridLinesBrush="#FFBCBCBC" RowBackground="#FFDEDEDE" CanUserAddRows="False">
                   
        				<DataGrid.Columns>

        					<DataGridTemplateColumn Width="197" Header="Código del Producto" IsReadOnly="True">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid Width="180" Height="40">
        									<TextBlock Text="{Binding Articulo.CodigoUnico}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
							<DataGridTemplateColumn Width="150" Header="Costo Unitario" IsReadOnly="True">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid Width="120" Height="40">
        									<TextBlock Text="{Binding CostoUnitario}" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" />
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
        					<DataGridTemplateColumn Width="100" Header="Disponible" IsReadOnly="True">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid Width="90" Height="20">
        									<StackPanel  Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
        									<TextBlock Text="{Binding Cantidade.Disponible}" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" />
											<TextBlock Text=" " HorizontalAlignment="Center" VerticalAlignment="Center"/>
											<TextBlock Text="{Binding Articulo.Medida.Simbolo}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</StackPanel>
										</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
        					<DataGridTemplateColumn Width="103" Header="Comprometido" IsReadOnly="True">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid Width="90" Height="20">
        									<StackPanel  Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
        									<TextBlock Text="{Binding Cantidade.Comprometido}" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" />
											<TextBlock Text=" " HorizontalAlignment="Center" VerticalAlignment="Center"/>
											<TextBlock Text="{Binding Articulo.Medida.Simbolo}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</StackPanel>
										</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
							<DataGridTemplateColumn Width="100" Header="Solicitado"  IsReadOnly="True">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid Width="90" Height="20">
        									<StackPanel  Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
        									<TextBlock Text="{Binding Cantidade.Solicitado}" HorizontalAlignment="Center" VerticalAlignment="Center" TextWrapping="Wrap" />
											<TextBlock Text=" " HorizontalAlignment="Center" VerticalAlignment="Center"/>
											<TextBlock Text="{Binding Articulo.Medida.Simbolo}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</StackPanel>
										</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
                           
						   	<DataGridTemplateColumn Width="100" Header="En Stock" IsReadOnly="True">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid Width="90" Height="20">
        									<StackPanel  Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
        									<TextBlock Text="{Binding Cantidade.Stock}"/>
											<TextBlock Text=" " HorizontalAlignment="Center" VerticalAlignment="Center"/>
											<TextBlock Text="{Binding Articulo.Medida.Simbolo}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</StackPanel>						
										</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
						   
        					<DataGridTemplateColumn Width="128" IsReadOnly="True">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid Width="128" Height="30">
                                            <TextBlock Text="Detalle de Cuentas" HorizontalAlignment="Center" Height="18.78" VerticalAlignment="Center" Width="120" FontFamily="Calibri" FontSize="15" TextDecorations="Underline" Foreground="#FF0384C5" Cursor="Hand" MouseUp="EditAccountsButtonClick"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>

        				</DataGrid.Columns>
        			</DataGrid>
        			<Label Content="Por favor seleccione una bodega." HorizontalAlignment="Left" Height="34" Margin="27,8,0,0" VerticalAlignment="Top" Width="254" FontFamily="Calibri" FontSize="16"/>
        			<ComboBox x:Name="InputBodegas" Margin="156,46,0,0" VerticalAlignment="Top" FontFamily="Calibri" SelectionChanged="StorageRoomComboChanged" HorizontalAlignment="Left" Width="125" FontSize="16"/>
        			<Label x:Name="TextNombreBodega" Content="" Height="34" Margin="0,46,306,0" VerticalAlignment="Top" HorizontalAlignment="Right" Width="125" FontFamily="Calibri" FontSize="16"/>
        			<Button Background="#FF0384C5" BorderBrush="{x:Null}" Clip="M5.5,27.5 C5.5,16.454305 14.454305,7.5 25.5,7.5 L200,7.5 C211.04569,7.5 220,16.454305 220,27.5 L220,30.72 C220,41.765695 211.04569,50.72 200,50.72 L25.5,50.72 C14.454305,50.72 5.5,41.765695 5.5,30.72 z" Content="Agregar Nueva Bodega" FontFamily="/LASDesktop;component/Fonts/#GeosansLight" FontSize="21.333" Foreground="White" Height="57.22" x:Name="SubmitButton_Copy" VerticalAlignment="Bottom" Width="226.5" Click="SubmitButtonClick" Cursor="Hand" HorizontalAlignment="Right" Margin="0,0,26,8" d:LayoutOverrides="Width" />
        			<Label Content="Nombre de la bodega:" Height="34" Margin="323,46,435,0" VerticalAlignment="Top" FontFamily="Calibri" FontSize="16"/>
        			<Label Content="Código:" HorizontalAlignment="Left" Height="34" Margin="27,46,0,0" VerticalAlignment="Top" Width="125" FontFamily="Calibri" FontSize="16"/>
        			
        		</Grid>
        	</TabItem>

            <TabItem Name="TabDeEntrada" Header="Entrada de Mercancias" FontSize="18.667" FontFamily="/LASDesktop;component/Fonts/#GeosansLight"  d:LayoutOverrides="HorizontalAlignment">
        		<Grid>
        			<Label Content="Fecha de Contabilización:" HorizontalAlignment="Right" Margin="0,12.427,219,0" VerticalAlignment="Top" Width="180" Height="25.14" FontSize="16" FontFamily="Calibri"/>
                    
        			<Button x:Name="AceptarEntrada" Content="Aceptar" HorizontalAlignment="Right" Height="15" Margin="0,0,21,8" VerticalAlignment="Bottom" Width="129" FontFamily="Segoe UI" FontSize="13.333" Foreground="White" Cursor="Hand" Click="AceptarEntradaClick"/>
        			<TextBox x:Name="TotalEntrada" HorizontalAlignment="Right" Height="21" Margin="0,0,21,63.153" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="180" FontFamily="Segoe UI" FontSize="13.333" TextAlignment="Right" IsReadOnly="True"/>
        			<Label Content="Total" HorizontalAlignment="Right" Margin="0,0,205,57.153" VerticalAlignment="Bottom" Width="53" Height="29.847" FontSize="16" FontFamily="Calibri"/>
        			<DatePicker x:Name="FechaEntradaDatePicker" HorizontalAlignment="Right" Margin="0,14.273,21,0" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="13.333" Width="198" BorderThickness="0"/>
        			<DataGrid x:Name="GridEntrada"  AutoGenerateColumns="False" Height="293.72" HorizontalAlignment="Left" Margin="24,53.64,0,0" VerticalAlignment="Top" Width="894" FontFamily="Calibri" FontSize="15" BorderBrush="{x:Null}" Background="#FFDEDEDE" HorizontalGridLinesBrush="#FFBCBCBC" VerticalGridLinesBrush="#FFBCBCBC" RowBackground="#FFDEDEDE" CanUserAddRows="False" SelectionUnit="FullRow" SelectedIndex="0">
                   
        				<DataGrid.Columns>
        					<DataGridTextColumn Header="#"/>
                            
        					<DataGridTemplateColumn Width="150" Header="Código del Artículo">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<ComboBox x:Name="ComboBoxArticulos" ItemsSource="{Binding ComboArticulos}" DisplayMemberPath="CodigoUnico"  SelectionChanged="ComboBoxArticulosEntradaSelectionChanged" SelectedItem="{Binding ArticuloNuevo}" />
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>

        					<DataGridTemplateColumn Width="110" Header="Descripción">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<TextBlock Text="{Binding ArticuloNuevo.Descripcion}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
							<DataGridTemplateColumn Width="75" Header="Bodegas">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<ComboBox x:Name="BodegaComboBox" ItemsSource="{Binding ComboBodegas}" DisplayMemberPath="NombreBodega" SelectionChanged="ComboBoxBodegasEntradaSelectionChanged" SelectedItem="{Binding BodegaFinal}" />
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
							<DataGridTemplateColumn Width="200" Header="Cuenta">
            						<DataGridTemplateColumn.CellTemplate>
            							<DataTemplate>
            								<Grid>
                                                <ComboBox ItemsSource="{Binding ComboCuentas}" DisplayMemberPath="Codigo" SelectionChanged="ComboBoxCuentasEntradaSelectionChanged" SelectedItem="{Binding Cuenta}" />
            								</Grid>
            							</DataTemplate>
            						</DataGridTemplateColumn.CellTemplate>
            					</DataGridTemplateColumn>

        					<DataGridTemplateColumn Width="85" Header="Cantidad">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<TextBox  Text="{Binding Cantidad}" Width="85" HorizontalAlignment="Center" VerticalAlignment="Center" LostFocus="TextboxEntradaCantidadChanged" />
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>

        					<DataGridTemplateColumn Width="120" Header="Costo Unitario">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
                                            <TextBlock Text="{Binding ArticuloEnBodega.CostoUnitario}" Width="120" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>

        					<DataGridTemplateColumn Width="100" Header="Total">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<TextBlock Text="{Binding Total}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
        					<DataGridTemplateColumn Width="25">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<Image HorizontalAlignment="Left" Height="20" Source="/LASDesktop;component/Graphics/Exit.png" Stretch="Fill" VerticalAlignment="Bottom" Width="20" Opacity="0.65" MouseUp="DeleteButtonEntradaClicked"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
        				</DataGrid.Columns>
        			</DataGrid>
        		</Grid>
        	</TabItem>
            <TabItem Name="TabDeSalida" Header="Salida de Mercancias" FontSize="18.667" FontFamily="/LASDesktop;component/Fonts/#GeosansLight"  d:LayoutOverrides="HorizontalAlignment">
        		<Grid>
        			<Label Content="Fecha de Contabilización:" HorizontalAlignment="Right" Margin="0,12.427,219,0" VerticalAlignment="Top" Width="180" Height="25.14" FontSize="16" FontFamily="Calibri"/>
                    
        			<Button x:Name="AceptarSalida" Content="Aceptar" HorizontalAlignment="Right" Height="15" Margin="0,0,21,8" VerticalAlignment="Bottom" Width="129" FontFamily="Segoe UI" FontSize="13.333" Foreground="White" Cursor="Hand" Click="AceptarSalidaClick"/>
        			<TextBox x:Name="TotalSalida" HorizontalAlignment="Right" Height="21" Margin="0,0,21,63.153" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="180" FontFamily="Segoe UI" FontSize="13.333" TextAlignment="Right" IsReadOnly="True"/>
        			<Label Content="Total" HorizontalAlignment="Right" Margin="0,0,205,57.153" VerticalAlignment="Bottom" Width="53" Height="29.847" FontSize="16" FontFamily="Calibri"/>
        			<DatePicker x:Name="FechaSalidaDatePicker" HorizontalAlignment="Right" Margin="0,14.273,21,0" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="13.333" Width="198" BorderThickness="0"/>
        			<DataGrid x:Name="GridSalida"  AutoGenerateColumns="False" Height="293.72" HorizontalAlignment="Left" Margin="24,53.64,0,0" VerticalAlignment="Top" Width="894" FontFamily="Calibri" FontSize="15" BorderBrush="{x:Null}" Background="#FFDEDEDE" HorizontalGridLinesBrush="#FFBCBCBC" VerticalGridLinesBrush="#FFBCBCBC" RowBackground="#FFDEDEDE" CanUserAddRows="False" SelectionUnit="FullRow" SelectedIndex="0">
                   
        				<DataGrid.Columns>
        					<DataGridTextColumn Header="#"/>
                            
        					<DataGridTemplateColumn Width="130" Header="Código del Artículo">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<ComboBox x:Name="ComboBoxArticulos" ItemsSource="{Binding ComboArticulos}" DisplayMemberPath="CodigoUnico"  SelectionChanged="ComboBoxArticulosSalidaSelectionChanged" SelectedItem="{Binding ArticuloNuevo}" />
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>

        					<DataGridTemplateColumn Width="110" Header="Descripción">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<TextBlock Text="{Binding ArticuloNuevo.Descripcion}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
        					<DataGridTemplateColumn Width="75" Header="Bodegas">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<ComboBox x:Name="BodegaComboBox" ItemsSource="{Binding ComboBodegas}" DisplayMemberPath="NombreBodega" SelectionChanged="ComboBoxBodegasSalidaSelectionChanged" SelectedItem="{Binding BodegaFinal}" />
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
							<DataGridTemplateColumn Width="110" Header="En Stock">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
                                            <TextBlock Text="{Binding ArticuloEnBodega.Cantidade.Stock}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
							<DataGridTemplateColumn Width="85" Header="Cantidad">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<TextBox Text="{Binding Cantidad}" Width="85" HorizontalAlignment="Center" VerticalAlignment="Center" LostFocus="TextboxCantidadSalidaChanged" />
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
        					<DataGridTemplateColumn Width="110" Header="Cuenta">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<ComboBox ItemsSource="{Binding ComboCuentas}" DisplayMemberPath="Codigo" SelectionChanged="ComboBoxCuentasSalidaSelectionChanged" SelectedItem="{Binding Cuenta}" />
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
        					
                            <DataGridTemplateColumn Width="120" Header="Costo Unitario">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
                                            <TextBlock Text="{Binding ArticuloEnBodega.CostoUnitario}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>

        					<DataGridTemplateColumn Width="100" Header="Total">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<TextBlock Text="{Binding Total}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
        					<DataGridTemplateColumn Width="25">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<Image HorizontalAlignment="Left" Height="20" Source="/LASDesktop;component/Graphics/Exit.png" Stretch="Fill" VerticalAlignment="Bottom" Width="20" Opacity="0.65" MouseUp="DeleteButtonSalidaClicked"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
        				</DataGrid.Columns>
        			</DataGrid>
        		</Grid>
        	</TabItem>
            <TabItem Name="TabDeTranslado" Header="Translado de Mercancias" FontSize="18.667" FontFamily="/LASDesktop;component/Fonts/#GeosansLight"  d:LayoutOverrides="HorizontalAlignment">
        		<Grid>
        			<Label Content="Fecha de Contabilización:" HorizontalAlignment="Right" Margin="0,12.427,219,0" VerticalAlignment="Top" Width="180" Height="25.14" FontSize="16" FontFamily="Calibri"/>
                    
        			<Button x:Name="AceptarTranslado" Content="Aceptar" HorizontalAlignment="Right" Height="15" Margin="0,0,21,8" VerticalAlignment="Bottom" Width="129" FontFamily="Segoe UI" FontSize="13.333" Foreground="White" Cursor="Hand" Click="AceptarTranslado_Click" />        			
        			<DatePicker x:Name="FechaTransladoDatePicker" HorizontalAlignment="Right" Margin="0,14.273,-6,0" VerticalAlignment="Top" FontFamily="Segoe UI" FontSize="13.333" Width="198" BorderThickness="0"/>
        			<DataGrid x:Name="GridTranslado"  AutoGenerateColumns="False" Height="256.72" HorizontalAlignment="Left" Margin="24,90.64,0,0" VerticalAlignment="Top" Width="894" FontFamily="Calibri" FontSize="15" BorderBrush="{x:Null}" Background="#FFDEDEDE" HorizontalGridLinesBrush="#FFBCBCBC" VerticalGridLinesBrush="#FFBCBCBC" RowBackground="#FFDEDEDE" CanUserAddRows="False" SelectionUnit="FullRow" SelectedIndex="0">
                   
        				<DataGrid.Columns>
        					<DataGridTextColumn Header="#"/>
                            
        					<DataGridTemplateColumn Width="150" Header="Código del Artículo">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<ComboBox x:Name="ComboBoxArticulos" ItemsSource="{Binding ComboArticulos}" DisplayMemberPath="CodigoUnico"  SelectionChanged="ComboBoxArticulosTransladoSelectionChanged" SelectedItem="{Binding ArticuloNuevo}" />
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>

        					<DataGridTemplateColumn Width="150" Header="Descripción">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<TextBlock Text="{Binding ArticuloNuevo.Descripcion}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
        					<DataGridTemplateColumn Width="150" Header="Bodega Destino">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<ComboBox x:Name="BodegaComboBox" ItemsSource="{Binding ComboBodegas}" DisplayMemberPath="NombreBodega" SelectionChanged="ComboBoxBodegasTransladoSelectionChanged" SelectedItem="{Binding BodegaFinal}" />
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
        					<DataGridTemplateColumn Width="150" Header="Stock del Origen">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<TextBlock Text="{Binding ArticuloEnBodega.Cantidade.Stock}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
        					<DataGridTemplateColumn Width="120" Header="Cantidad">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<TextBox  Text="{Binding Cantidad}" Width="120" HorizontalAlignment="Center" VerticalAlignment="Center" LostFocus="TextboxTransladoCantidadChanged" />
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>

        					<DataGridTemplateColumn Width="120" Header="Total">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<TextBlock Text="{Binding Total}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
							
        					<DataGridTemplateColumn Width="25">
        						<DataGridTemplateColumn.CellTemplate>
        							<DataTemplate>
        								<Grid>
        									<Image HorizontalAlignment="Left" Height="20" Source="/LASDesktop;component/Graphics/Exit.png" Stretch="Fill" VerticalAlignment="Bottom" Width="20" Opacity="0.65" MouseUp="DeleteButtonTransladoClicked"/>
        								</Grid>
        							</DataTemplate>
        						</DataGridTemplateColumn.CellTemplate>
        					</DataGridTemplateColumn>
        				</DataGrid.Columns>
        			</DataGrid>
        			<Label Content="Bodega de Origen:" HorizontalAlignment="Right" Margin="0,45.273,219,0" VerticalAlignment="Top" Width="180" Height="29.14" FontSize="16" FontFamily="Calibri"/>
        			<ComboBox x:Name="InputBodegasTranslado" Margin="0,49.883,75,0" VerticalAlignment="Top" FontFamily="Calibri" SelectionChanged="StorageRoomComboChanged" HorizontalAlignment="Right" Width="117" FontSize="16" DisplayMemberPath="CodigoBodega" />
        		</Grid>
        	</TabItem>
        </TabControl>
        <Rectangle x:Name="Overlay" Fill="#AC161616" Margin="0,-2,0,0" Visibility="Hidden"/>
        <Grid Height="100" VerticalAlignment="Top" Margin="317,-2,8,0">
        	<Label Content="Inventario" Margin="0,23.5,0,27" x:Name="label1_Copy" FontFamily="../Fonts/GeosansLight.ttf#GeosansLight" FontSize="37.333" Foreground="#FFDEDEDE" HorizontalAlignment="Left" Width="159" Cursor="Hand" MouseDown="ChangeWindow" />
        	<Label Content="Socios" Margin="0,23.5,154,27" x:Name="label1_Copy1" FontFamily="../Fonts/GeosansLight.ttf#GeosansLight" FontSize="37.333" Foreground="#FFDEDEDE" HorizontalAlignment="Right" Width="114" Cursor="Hand" MouseDown="ChangeWindow" />
        	<Label Content="Compras" Margin="282,23.5,268,27" x:Name="label1_Copy2" FontFamily="../Fonts/GeosansLight.ttf#GeosansLight" FontSize="37.333" Foreground="#FFDEDEDE" Cursor="Hand" MouseDown="ChangeWindow" />
        	<Label Content="Ventas" Margin="163,23.5,0,27" x:Name="label1_Copy3" FontFamily="../Fonts/GeosansLight.ttf#GeosansLight" FontSize="37.333" Foreground="#FFDEDEDE" HorizontalAlignment="Left" Width="115" Cursor="Hand" MouseDown="ChangeWindow" />
        	<Label Content="Bancos" Margin="0,23.5,28,27" x:Name="label1_Copy4" FontFamily="../Fonts/GeosansLight.ttf#GeosansLight" FontSize="37.333" Foreground="#FFDEDEDE" HorizontalAlignment="Right" Width="122" Cursor="Hand" MouseDown="ChangeWindow" />
        </Grid>
        
    </Grid>
</Window>
